#Figure 2

load("Figure 2.Rdata")

#Setup
pal<-rev(viridis(7))

mapParams<-mapCountryData(mapped_data, nameColumnToPlot = "sum", catMethod = c(0,1,3,5,13,19,29,36), 
                          mapTitle = "",
                          addLegend = F,
                          colourPalette = pal,
                          borderCol = "black")
do.call(addMapLegend,
        c(mapParams,
          legendLabels="all",
          labelFontSize=.7))

#Draw map
pdf("Figure2.pdf", width=8, height=6)
mapParams<-mapCountryData(mapped_data, nameColumnToPlot = "sum", catMethod = c(0,1,3,5,13,19,29,36), 
                          mapTitle = "",
                          addLegend = F,
                          colourPalette = pal,
                          borderCol = "black")
do.call(addMapLegend,
        c(mapParams,
          legendLabels="all",
          labelFontSize=.7))
dev.off()

rm(mapParams, mapped_data, pal)
